import http from '@/utils/http.js';
//单商品下单
export function orderGood(data) {
	return http.post('/auth/order/checkOrder', data);
}
//购物车提交订单
export function checkout(data) {
	return http.post('/auth/car/checkOrder', data);
}
//获取当前临时订单
export function getTempOrder() {
	return http.get('/auth/car/getTempOrder');
}
//提交订单
export function submitOrder(data) {
	return http.get('/auth/order/submit', data);
}

//下单
export function orderPay(orderSn) {
	return http.get(`/auth/order/checkOrder/${orderSn}`);
}

//团购下单
export function groupOrder(data) {
	return http.post('/auth/group/buy', data);
}

//获取订单列表
export function getOrderList(data) {
	return http.get('/auth/order/getOrderList/page', data);
}

//获取订单详情
export function getOrderDetail(orderId) {
	return http.get(`/auth/order/getOrderDetail/${orderId}`);
}

//用户收货
export function orderReceive(orderId) {
	return http.get(`/auth/order/receive/${orderId}`);
}

//获取订单核销信息
export function getVerifyInfo(orderId) {
	return http.get(`/auth/order/getVerifyInfo/${orderId}`);
}

//用户评价
export function orderComment(data) {
	return http.post('/auth/order/comment/add', data);
}